package com.macro.mall.tiny.modules.ums.service;

import com.macro.mall.tiny.common.api.CommonResult;
import com.macro.mall.tiny.modules.ums.model.UmsMember;
import com.baomidou.mybatisplus.extension.service.IService;
import com.macro.mall.tiny.modules.ums.vo.LoginVO;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 小程序用户表 服务类
 * </p>
 *
 * @author tyrone
 * @since 2024-10-14
 */
public interface UmsMemberService extends IService<UmsMember> {
    /**
     * 根据用户名获取会员
     */
    UmsMember getUmsMemberById(Long memberId);

    /**
     * 用户注册
     */
    @Transactional
    void register(String openId);

    /**
     * 生成验证码
     */
    String generateauthcode(String telephone, String openId);

    /**
     * 刷新token
     */
    String refreshToken(String token);

    CommonResult<LoginVO> check(String jsCode);


    @Transactional
    CommonResult fillInfo(UmsMember umsMember);

    UmsMember getUmsMemberByOpenId(String openId);

    List<Map<String,Object>> getDailyIncreaseData(Date startDate, Date endDate,Integer vip);

}
